package com.atguigu.apiservice.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author testjava
 * @since 2020-03-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Book对象", description="")
public class Book implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "图书编号")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "书名")
    private String name;

    @ApiModelProperty(value = "标签")
    private String labelId;

    @ApiModelProperty(value = "作者编号")
    @TableField("authorId")
    private String authorId;

    @ApiModelProperty(value = "类别编号")
    @TableField("typeId")
    private Integer typeId;

    @ApiModelProperty(value = "字数")
    @TableField("wordNum")
    private Integer wordNum;

    @ApiModelProperty(value = "收藏数")
    @TableField("collectionNum")
    private Integer collectionNum;

    @ApiModelProperty(value = "图书状态（0-审核中，1-新建，2-签约作品）")
    private Integer state;

    @ApiModelProperty(value = "图书简介")
    private String profile;

    @ApiModelProperty(value = "点击数")
    @TableField("clickNum")
    private Integer clickNum;

    @ApiModelProperty(value = "封面")
    private String cover;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date creationTime;

    @ApiModelProperty(value = "最新章节编号")
    @TableField("chapterId")
    private Integer chapterId;

    @ApiModelProperty(value = "推荐数")
    @TableField("recommendNum")
    private Integer recommendNum;

    @ApiModelProperty(value = "主编推荐")
    @TableField("isRecommend")
    private Boolean isRecommend;

    @ApiModelProperty(value = "下载链接")
    @TableField("book_url")
    private String bookUrl;


}
